﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Zhao.Common.Applet.Model
{
    /// <summary>
    /// 小程序登录
    /// </summary>
    public class Code2SessionParamter
    {
        /// <summary>
        /// 小程序 appId
        /// </summary>
        public string appid { get; set; }
        /// <summary>
        /// 小程序 appSecret
        /// </summary>
        public string secret { get; set; }
        /// <summary>
        /// 登录时获取的 code
        /// </summary>
        public string js_code { get; set; }
        /// <summary>
        ///  授权类型，此处只需填写 authorization_code
        /// </summary>
        public string grant_type { get; set; } = "authorization_code";

        public Code2SessionParamter(string js_code)
        {
            this.js_code = js_code;
        }

        public Code2SessionParamter(string appid, string secret, string js_code)
        {
            this.appid = appid;
            this.secret = secret;
            this.js_code = js_code;
        }
    }
}
